package com.yeung.config;

import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer;
import org.springframework.context.annotation.Bean;

@org.springframework.context.annotation.Configuration
public class MyBatisConfig {
    @Bean
    public ConfigurationCustomizer configurationCustomizer() {
        //       Java lambda 写法
        return configuration -> {
            //设置下划线命名与驼峰命名的映射, 否者命名不一致时,数据不能封装
            configuration.setMapUnderscoreToCamelCase(true);
        };
    }
}
